<!DOCTYPE html>
<html lang="{{ lang }}">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>{{ title }} - {{ i18n(key='navigation_about_us') }} - {{ site_info.name }}</title>
    <link rel="shortcut icon" href="{{ url_for('static', path='favicon.ico') }}" type="image/x-icon">
    <meta name="keywords" content="{{ site_info.keyword }}"/>
    <meta name="description" content="{{ site_info.description }}"/>
    <meta name="applicable-device" content="pc,mobile"/>
    <link href="{{ url_for('static', path='css/bootstrap.min.css') }}" rel="stylesheet"/>
    <link href="{{ url_for('static', path='css/bxslider.css') }}" rel="stylesheet"/>
    <link href="{{ url_for('static', path='css/style.css') }}" rel="stylesheet"/>
    <script src="{{ url_for('static', path='js/jquery.min.js') }}"></script>
    <script src="{{ url_for('static', path='js/bxslider.min.js') }}"></script>
    <script src="{{ url_for('static', path='js/common.js') }}"></script>
    <script src="{{ url_for('static', path='js/bootstrap.min.js') }}"></script>
</head>
<body>
{% include 'layout/header.html' %}
<div class="page_bg" style="background: url({{ url_for('static', path='images/detail_bg.jpg') }}) center top no-repeat;"></div>
<div class="bread_bg">
    <div class="container">
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12">
                <div class="bread_nav">
                    <span class="glyphicon glyphicon-home" aria-hidden="true"></span>
                    <a href="{{ url_for('index') }}">{{ i18n(key='navigation_home') }}</a> >
                    <a href="{{ url_for('about', page_type='company_profile') }}">{{ i18n(key='navigation_about_us') }}</a> >
                    <a href="{{ url_for('about', page_type=sub_nav) }}">{{ title }}</a>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="container">
    <div class="row">
        <!-- left -->
        <div class="col-xs-12 col-sm-4 col-md-3">
            {% include 'layout/about_sidebar.html' %}
            {% include 'layout/news_sidebar.html' %}
        </div>
        <!-- right -->
        <div class="col-xs-12 col-sm-8 col-md-9" style="float:right; margin-bottom: 36px;">
            <div class="right_head">
                <h2>
                    <span>{{ title }}</span>
                </h2>
            </div>
            {% if type == 'text' %}
            {{ text | safe }}
            {% elif type == 'image' %}
            <div id="layer-photos" class="product_list product_list2">
                {% for img in images %}
                <div class="col-sm-4 col-md-4 col-mm-6 product_img">
                    <a href="javascript:;" title="{{ img.title }}"><img src="{{ url_for('upload', path='page/' + (img.id | string) + '.jpg') }}" layer-src="{{ url_for('upload', path='page/' + (img.id | string) + '.jpg') }}" alt="{{ img.title }}" class="img-thumbnail" /></a>
                    <p class="product_title"><a href="javascript:;" title="{{ img.title }}">{{ img.title }}</a></p>
                </div>
                {% endfor %}
                <div class="pages">
                    <ul>
                        {% if pagination.currentPage != 1 %}
                        <a href="{{ url_for('about', page_type=sub_nav, page=1) }}"  style="text-decoration: none;">
                            <li><span class="pageinfo pageinfo-link">{{ i18n(key='first_page') }}</span></li>
                        </a>
                        {% endif %}
                        {% if pagination.prevPage %}
                        <a href="{{ url_for('about', page_type=sub_nav, page=pagination.prevPage) }}" style="text-decoration: none;">
                            <li><span class="pageinfo pageinfo-link">{{ i18n(key='prev_page') }}</span></li>
                        </a>
                        {% endif %}
                        <li>
                            <span class="pageinfo">
                                {{ i18n(key='page') }}
                                <strong>{{ pagination.currentPage }} / {{ pagination.totalPage }}</strong>
                                {{ i18n(key='total') }}
                                <strong>{{ pagination.totalRows }}</strong>
                                {{ i18n(key='records') }}
                            </span>
                        </li>
                        {% if pagination.nextPage %}
                        <a href="{{ url_for('about', page_type=sub_nav, page=pagination.nextPage) }}" style="text-decoration: none;">
                            <li><span class="pageinfo pageinfo-link">{{ i18n(key='next_page') }}</span></li>
                        </a>
                        {% endif %}
                        {% if pagination.currentPage != pagination.totalPage %}
                        <a href="{{ url_for('about', page_type=sub_nav, page=pagination.totalPage) }}" style="text-decoration: none;">
                            <li><span class="pageinfo pageinfo-link">{{ i18n(key='last_page') }}</span></li>
                        </a>
                        {% endif %}
                    </ul>
                </div>
            </div>
            <script src="{{  url_for('static', path='layer/layer.js') }}"></script>
            <script>
                layer.photos({
                    photos: '#layer-photos',
                    anim: 5
                });
            </script>
            {% endif %}
        </div>
    </div>
</div>
{% include 'layout/footer.html' %}
</body>
</html>